$-np - 6nq + n + 9 = -10p - 8$ Solve for $n$.
Combine constant terms on the right. $-np - 6nq + n + {9} = -10p - {8}$ $-np - 6nq + n = -10p - {17}$ Notice that all the terms on the left-hand side of the equation have $n$ in them. $-1{n}p - 6{n}q + 1{n} = -10p - 17$ Factor out the $n$ ${n} \cdot \left( -p - 6q + 1 \right) = -10p - 17$ Isolate the $n$ $n \cdot \left( -{p - 6q + 1} \right) = -10p - 17$ $n = \dfrac{ -10p - 17 }{ -{p - 6q + 1} }$ We can simplify this by multiplying the top and bottom by $-1$. $n= \dfrac{10p + 17}{p + 6q - 1}$